// vite.config.ts
import { defineApplicationConfig } from "file:///D:/jsWorkSpace/hc-vben-admin-main/internal/vite-config/dist/index.mjs";
import Inspector from "file:///D:/jsWorkSpace/hc-vben-admin-main/node_modules/.pnpm/vite-plugin-vue-inspector@5.1.2_vite@5.3.1_@types+node@20.14.8_less@4.2.0_sass@1.77.6_terser@5.31.1_/node_modules/vite-plugin-vue-inspector/dist/index.mjs";
import { loadEnv } from "file:///D:/jsWorkSpace/hc-vben-admin-main/node_modules/.pnpm/vite@5.3.1_@types+node@20.14.8_less@4.2.0_sass@1.77.6_terser@5.31.1/node_modules/vite/dist/node/index.js";
function getApi() {
  const env = loadEnv(process.env.NODE_ENV, process.cwd());
  console.log("env is ", process.env.NODE_ENV);
  return env.VITE_HC_HTTP;
}
var vite_config_default = defineApplicationConfig({
  overrides: {
    base: "/hc-iot/",
    optimizeDeps: {
      include: [
        "echarts/core",
        "echarts/charts",
        "echarts/components",
        "echarts/renderers",
        "qrcode",
        "@iconify/iconify",
        "ant-design-vue/es/locale/zh_CN",
        "ant-design-vue/es/locale/en_US"
      ]
    },
    server: {
      proxy: {
        "/hc-api": {
          target: getApi(),
          changeOrigin: true,
          // ws: true,
          rewrite: (path) => path.replace(new RegExp(`^/hc-api`), "api")
          // rewrite: (path) => path.replace(new RegExp(`^/hc-api`), ''),
          // only https
          // secure: false
        },
        "/ws": {
          target: getApi(),
          changeOrigin: true,
          ws: true
          // rewrite: (path) => path.replace(new RegExp(`^/hc-api`), 'api'),
          // only https
          // secure: false
        },
        "/basic-api": {
          target: "http://localhost:3000",
          changeOrigin: true,
          ws: true,
          rewrite: (path) => path.replace(new RegExp(`^/basic-api`), "")
          // only https
          // secure: false
        },
        "/upload": {
          target: "http://localhost:3300/upload",
          changeOrigin: true,
          ws: true,
          rewrite: (path) => path.replace(new RegExp(`^/upload`), "")
        }
      },
      open: true,
      // 项目启动后，自动打开
      warmup: {
        clientFiles: ["./index.html", "./src/{views,components}/*"]
      }
    },
    plugins: [
      Inspector({
        openInEditorHost: "http://localhost:5173"
      })
    ]
  }
});
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJEOlxcXFxqc1dvcmtTcGFjZVxcXFxoYy12YmVuLWFkbWluLW1haW5cIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfZmlsZW5hbWUgPSBcIkQ6XFxcXGpzV29ya1NwYWNlXFxcXGhjLXZiZW4tYWRtaW4tbWFpblxcXFx2aXRlLmNvbmZpZy50c1wiO2NvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9pbXBvcnRfbWV0YV91cmwgPSBcImZpbGU6Ly8vRDovanNXb3JrU3BhY2UvaGMtdmJlbi1hZG1pbi1tYWluL3ZpdGUuY29uZmlnLnRzXCI7aW1wb3J0IHsgZGVmaW5lQXBwbGljYXRpb25Db25maWcgfSBmcm9tICdAdmJlbi92aXRlLWNvbmZpZyc7XG5pbXBvcnQgSW5zcGVjdG9yIGZyb20gJ3ZpdGUtcGx1Z2luLXZ1ZS1pbnNwZWN0b3InO1xuaW1wb3J0IHsgbG9hZEVudiB9IGZyb20gJ3ZpdGUnO1xuXG5mdW5jdGlvbiBnZXRBcGkoKSB7XG4gIGNvbnN0IGVudiA9IGxvYWRFbnYocHJvY2Vzcy5lbnYuTk9ERV9FTlYsIHByb2Nlc3MuY3dkKCkpOyAvLyBcdTgzQjdcdTUzRDYuZW52XHU2NTg3XHU0RUY2XHU5MUNDXHU1QjlBXHU0RTQ5XHU3Njg0XHU3M0FGXHU1ODgzXHU1M0Q4XHU5MUNGXG4gIGNvbnNvbGUubG9nKCdlbnYgaXMgJywgcHJvY2Vzcy5lbnYuTk9ERV9FTlYpO1xuICByZXR1cm4gZW52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AgICAgd3M6IHRydWUsXG4gICAgICAgICAgLy8gcmV3cml0ZTogKHBhdGgpID0+IHBhdGgucmVwbGFjZShuZXcgUmVnRXhwKGBeL2hjLWFwaWApLCAnYXBpJyksXG4gICAgICAgICAgLy8gb25seSBodHRwc1xuICAgICAgICAgIC8vIHNlY3VyZTogZmFsc2VcbiAgICAgICAgfSxcbiAgICAgICAgJy9iYXNpYy1hcGknOiB7XG4gICAgICAgICAgdGFyZ2V0OiAnaHR0cDovL2xvY2FsaG9zdDozMDAwJyxcbiAgICAgICAgICBjaGFuZ2VPcmlnaW46IHRydWUsXG4gICAgICAgICAgd3M6IHRydWUsXG4gICAgICAgICAgcmV3cml0ZTogKHBhdGgpID0+IHBhdGgucmVwbGFjZShuZXcgUmVnRXhwKGBeL2Jhc2ljLWFwaWApLCAnJyksXG4gICAgICAgICAgLy8gb25seSBodHRwc1xuICAgICAgICAgIC8vIHNlY3VyZTogZmFsc2VcbiAgICAgICAgfSxcbiAgICAgICAgJy91cGxvYWQnOiB7XG4gICAgICAgICAgdGFyZ2V0OiAnaHR0cDovL2xvY2FsaG9zdDozMzAwL3VwbG9hZCcsXG4gICAgICAgICAgY2hhbmdlT3JpZ2luOiB0cnVlLFxuICAgICAgICAgIHdzOiB0cnVlLFxuICAgICAgICAgIHJld3JpdGU6IChwYXRoKSA9PiBwYXRoLnJlcGxhY2UobmV3IFJlZ0V4cChgXi91cGxvYWRgKSwgJycpLFxuICAgICAgICB9LFxuICAgICAgfSxcbiAgICAgIG9wZW46IHRydWUsIC8vIFx1OTg3OVx1NzZFRVx1NTQyRlx1NTJBOFx1NTQwRVx1RkYwQ1x1ODFFQVx1NTJBOFx1NjI1M1x1NUYwMFxuICAgICAgd2FybXVwOiB7XG4gICAgICAgIGNsaWVudEZpbGVzOiBbJy4vaW5kZXguaHRtbCcsICcuL3NyYy97dmlld3MsY29tcG9uZW50c30vKiddLFxuICAgICAgfSxcbiAgICB9LFxuICAgIHBsdWdpbnM6IFtcbiAgICA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